import bean.MyTestBean;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * @author puruidong
 * @version 2019/2/12 21:04
 */
public class BeanFactoryTest {


    @Test
    public void testSimpleLoad(){
        BeanFactory beanFactory = new ClassPathXmlApplicationContext("beanFactory.xml");
        MyTestBean bean=(MyTestBean) beanFactory.getBean("myTestBean");
        assertEquals("testStr",bean.getTestStr());
    }

}
